﻿using Swork03_28.Domain.RBAC;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.Server.Interface
{
    public interface IMenuServer
    {
        Task<int> MenuAdd(MenuInfo menuInfo);

        List<MenuItem> GetMenuItems(int pid);

        Task<(int totalCount, int pageCount, List<MenuInfo> list)> GetMenuInfos(int pageIndex, int pageSize);

        Task<object> Del(int id);

        Task<int> DelMuch(List<int>? ids);

        Task<MenuInfo> GetMenu(int id);

        Task<int> Update(MenuInfo info);

        List<MenuItem> GetMenuTree(int pId, string? name);

        Task<List<MenuItem>> GetRoleTree(string? name);

        Task<List<int>> MenuTreeIds(int Rid);
        Task<int> RoleMenuAdd(int Rid, List<int> MenuId);
    }
}
